/*
 * AbstractThreadFactory.h
 *
 *  Created on: 2022年9月15日
 *      Author: wocao
 */
#include "Thread.h"
#include "Thread11.h"
#ifndef THREAD_ABSTRACTTHREADFACTORY_H_
#define THREAD_ABSTRACTTHREADFACTORY_H_

class AbstractThreadFactory {
public:
	AbstractThreadFactory();
	virtual ~AbstractThreadFactory();
	static AbstractThread* getThread(void* (*start)(void*), void *arg,
			Threadpool *pool) {
		return new Thread(start, arg, pool);
	}

	static AbstractThread* getThread(void* (*run)(void*), void *classaddr, void *arg,
			Threadpool *pool) {
		return new Thread11(run,classaddr, arg, pool);
	}
};

#endif /* THREAD_ABSTRACTTHREADFACTORY_H_ */
